// ie polyfill
import '@babel/polyfill'
import './style/main.less'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/'
import { VueAxios } from './utils/request'

// mock
import './mock'

import bootstrap from './core/bootstrap'
import './core/use'
import './permission' // permission control
import './utils/filter' // global filter
import i18n from './locales'
import { PageHeaderWrapper } from '@ant-design-vue/pro-layout'
import defaultConfig from '../public/static/global-config.json'
import axios from 'axios'

// mount axios Vue.$http and this.$http
Vue.use(VueAxios)
Vue.component('page-header-wrapper', PageHeaderWrapper)

axios.defaults.baseURL = defaultConfig.BASE_URL
axios.defaults.timeout = defaultConfig.AJAX_TIMEOUT

new Vue({
    router,
    store,
    i18n,
    created: bootstrap,
    render: h => h(App)
}).$mount('#app')
